using UnityEngine;

public class MenuContinue : MonoBehaviour
{
	[SerializeField]
	private AudioClip clip;

	private void Update()
	{
		if (Input.GetMouseButtonDown(0))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			Continue();
		}
	}

	public void Continue()
	{
		if ((PlayerPrefs.GetString("Consent") == "adfree" && PlayerPrefs.GetInt("tmp") == 7) || PlayerPrefs.GetString("Consent") != "adfree")
		{
			UnityEngine.SceneManagement.SceneManager.LoadScene("mainmenu2");
			if (PlayerPrefs.GetString("Consent") == "true" || PlayerPrefs.GetString("Consent") == "false")
			{
				AdvertisementHandler.InstantiateDefault();
				AdvertisementHandler.EnableAds();
			}
		}
		else
		{
			AdvertisementHandler.ShowConsentForm();
		}
	}
}
